package com.mooneil.sadness.dao;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.mooneil.sadness.domain.GuestbookArticle;

@Repository
public class GuestbookDAOImpl extends SqlSessionDaoSupport implements
		GuestbookDAO {

	private static final String NAMESAPCE = "article.";

	@Override
	public List<GuestbookArticle> getGuestbookArticleList() {

		return getSqlSession()
				.selectList(NAMESAPCE + "getGuestbookArticleList");
	}

	@Override
	public void addGuestbookArticle(GuestbookArticle guestbookArticle) {

		getSqlSession().insert(NAMESAPCE + "addGuestbookArticle",
				guestbookArticle);
	}

}
